package com.yyds.mapper;


import com.yyds.pojo.PreventArea;
import com.yyds.vo.PreventAreaVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;


public interface PreventAreaMapper {

    //查全部封控地区
    List<PreventAreaVo> selectAllPreventAreaMapper(Map<String, Object> params);
    @Select("select region_name from prevent_region")
    List<String> selectAreaNameService();
//    List<PreventArea> findPreventAreaMapper(PreventArea preventArea);
    //添加封控区域
    Integer insertPreventAreaMapper(PreventArea preventArea);
    //解除风控
    @Delete("delete from prevent_area where area_id = #{area_id}")
    Integer deletePreventAreaServiceByIdMapper(Integer area_id);
    //修改
    int updatePreventAreaServiceByIdMapper(PreventAreaVo preventAreaVo);
    //根据地区名查id
    Integer selectRegionIdMapper(String region_name);
    //删除部分
    Integer deletesPreventArea(List<Integer> list);
    //统计
    @Select("select count(*) as num from prevent_area")
    int selectCountPreventArea();

}
